<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.sql.*,com.sql.*" errorPage="/error.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改管理员</title>
<style type="text/css">
<!--
@import url("../images/css.css");
.style1 {font-size: 13px}
-->
</style>
</head>

<body>
<jsp:useBean id="Detail" class="com.beans.user.AdminDetail" scope="page"/>

<%
String adminId=request.getParameter("id");
Detail.setAdminInfo(adminId);%>
<form action="/manageadmin" method="post" name="theform" id="theform">
  <br>
  <table width="70%"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr class="table-bg">
      <td height="25" align="right"><span class="style1">所属管理员组：</span></td>
      <td height="25"><span class="style1">
        <select name="groupno">
          <option value="<%=Detail.getGroupNo()%>" selected><%=Detail.getGroupName()%></option>
          <%
	    Connection conn=null;
		Statement stmt=null;
		ResultSet rs=null;
    try {
	  conn=DBFactory.getConnection();
      stmt = conn.createStatement();
      rs = stmt.executeQuery("select * from admingroup");
	 while(rs.next())
	 {%>
          <option value="<%=rs.getString("group_no")%>"><%=rs.getString("group_name")%></option>
          <%}
	 }catch(Exception e){
	 out.print(e.getMessage());
	 }finally{
	 try{
	 rs.close();
	 stmt.close();
	 conn.close();
	 }catch(SQLException se){
	 }
	 }%>
        </select>
        <input name="id" type="hidden"value="<%=adminId%>">
      </span></td>
    </tr>
    <tr class="table-bg">
      <td width="29%" height="25" align="right"><span class="style1">管理员名：</span></td>
      <td width="71%" height="25"><span class="style1">&nbsp;<%=Detail.getAdminName()%>
            <input name="adminname" type="hidden" value="<%=Detail.getAdminName()%>">
      </span></td>
    </tr>
    <tr class="table-bg">
      <td height="25" align="right"><span class="style1">登录密码：</span></td>
      <td height="25"><input name="password" type="password" class="style1"value="">（不修改请不要填写）</td>
	  <input name="pw" type="hidden" value="<%=Detail.getAdminPassword()%>" />
    </tr>
    <tr class="table-bg">
      <td height="25" align="right"><span class="style1">确认密码：</span></td>
      <td height="25"><input name="repassword" type="text" class="style1" ></td>
    </tr>
    <tr class="table-bg">
      <td height="25" align="right" valign="middle"><span class="style1">备注：</span></td>
      <td height="25" align="right"><div align="left" class="style1">
          <textarea name="adminmemo" cols="40%" rows="8"><%=Detail.getMemo()%></textarea>
      </div></td>
    </tr>
    <tr class="table-bg">
      <td height="25" colspan="2" align="right" valign="middle"><div align="center" class="style1">
          <input name="edit" type="submit" id="edit" value=" 编辑 ">
          <input type="reset" name="Submit" value=" 重置 ">
      </div></td>
    </tr>
  </table>
</form>
</body>
</html>
